home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / docshell / nsIScrollable.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  204 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScrollable.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScrollable_h__
  6. #define __gen_nsIScrollable_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIScrollable */
  19. #define NS_ISCROLLABLE_IID_STR "919e792a-6490-40b8-bba5-f9e9ad5640c8"
  20.  
  21. #define NS_ISCROLLABLE_IID \
  22.   {0x919e792a, 0x6490, 0x40b8, \
  23.     { 0xbb, 0xa5, 0xf9, 0xe9, 0xad, 0x56, 0x40, 0xc8 }}
  24.  
  25. /**
  26.  * The nsIScrollable is an interface that can be implemented by a control that
  27.  * supports scrolling.  This is a generic interface without concern for the 
  28.  * type of content that may be inside.  It simply deals blindly with scroll
  29.  * position as a composite of the lowest possible scroll position, the highest
  30.  * possible position and the current position lying somewhere between the 
  31.  * min and the max. 
  32.  */
  33. class NS_NO_VTABLE nsIScrollable : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCROLLABLE_IID)
  37.  
  38.   enum { ScrollOrientation_X = 1 };
  39.  
  40.   enum { ScrollOrientation_Y = 2 };
  41.  
  42.   /* long getCurScrollPos (in long scrollOrientation); */
  43.   NS_IMETHOD GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *_retval) = 0;
  44.  
  45.   /* void setCurScrollPos (in long scrollOrientation, in long curPos); */
  46.   NS_IMETHOD SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos) = 0;
  47.  
  48.   /* void setCurScrollPosEx (in long curHorizontalPos, in long curVerticalPos); */
  49.   NS_IMETHOD SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos) = 0;
  50.  
  51.   /* void getScrollRange (in long scrollOrientation, out long minPos, out long maxPos); */
  52.   NS_IMETHOD GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos) = 0;
  53.  
  54.   /* void setScrollRange (in long scrollOrientation, in long minPos, in long maxPos); */
  55.   NS_IMETHOD SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos) = 0;
  56.  
  57.   /* void setScrollRangeEx (in long minHorizontalPos, in long maxHorizontalPos, in long minVerticalPos, in long maxVerticalPos); */
  58.   NS_IMETHOD SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos, PRInt32 minVerticalPos, PRInt32 maxVerticalPos) = 0;
  59.  
  60.   enum { Scrollbar_Auto = 1 };
  61.  
  62.   enum { Scrollbar_Never = 2 };
  63.  
  64.   enum { Scrollbar_Always = 3 };
  65.  
  66.   /* long getDefaultScrollbarPreferences (in long scrollOrientation); */
  67.   NS_IMETHOD GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *_retval) = 0;
  68.  
  69.   /* void setDefaultScrollbarPreferences (in long scrollOrientation, in long scrollbarPref); */
  70.   NS_IMETHOD SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref) = 0;
  71.  
  72.   /* void getScrollbarVisibility (out boolean verticalVisible, out boolean horizontalVisible); */
  73.   NS_IMETHOD GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible) = 0;
  74.  
  75. };
  76.  
  77. /* Use this macro when declaring classes that implement this interface. */
  78. #define NS_DECL_NSISCROLLABLE \
  79.   NS_IMETHOD GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *_retval); \
  80.   NS_IMETHOD SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos); \
  81.   NS_IMETHOD SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos); \
  82.   NS_IMETHOD GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos); \
  83.   NS_IMETHOD SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos); \
  84.   NS_IMETHOD SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos, PRInt32 minVerticalPos, PRInt32 maxVerticalPos); \
  85.   NS_IMETHOD GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *_retval); \
  86.   NS_IMETHOD SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref); \
  87.   NS_IMETHOD GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible); 
  88.  
  89. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  90. #define NS_FORWARD_NSISCROLLABLE(_to) \
  91.   NS_IMETHOD GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *_retval) { return _to GetCurScrollPos(scrollOrientation, _retval); } \
  92.   NS_IMETHOD SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos) { return _to SetCurScrollPos(scrollOrientation, curPos); } \
  93.   NS_IMETHOD SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos) { return _to SetCurScrollPosEx(curHorizontalPos, curVerticalPos); } \
  94.   NS_IMETHOD GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos) { return _to GetScrollRange(scrollOrientation, minPos, maxPos); } \
  95.   NS_IMETHOD SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos) { return _to SetScrollRange(scrollOrientation, minPos, maxPos); } \
  96.   NS_IMETHOD SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos, PRInt32 minVerticalPos, PRInt32 maxVerticalPos) { return _to SetScrollRangeEx(minHorizontalPos, maxHorizontalPos, minVerticalPos, maxVerticalPos); } \
  97.   NS_IMETHOD GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *_retval) { return _to GetDefaultScrollbarPreferences(scrollOrientation, _retval); } \
  98.   NS_IMETHOD SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref) { return _to SetDefaultScrollbarPreferences(scrollOrientation, scrollbarPref); } \
  99.   NS_IMETHOD GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible) { return _to GetScrollbarVisibility(verticalVisible, horizontalVisible); } 
  100.  
  101. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  102. #define NS_FORWARD_SAFE_NSISCROLLABLE(_to) \
  103.   NS_IMETHOD GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurScrollPos(scrollOrientation, _retval); } \
  104.   NS_IMETHOD SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurScrollPos(scrollOrientation, curPos); } \
  105.   NS_IMETHOD SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurScrollPosEx(curHorizontalPos, curVerticalPos); } \
  106.   NS_IMETHOD GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollRange(scrollOrientation, minPos, maxPos); } \
  107.   NS_IMETHOD SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScrollRange(scrollOrientation, minPos, maxPos); } \
  108.   NS_IMETHOD SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos, PRInt32 minVerticalPos, PRInt32 maxVerticalPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScrollRangeEx(minHorizontalPos, maxHorizontalPos, minVerticalPos, maxVerticalPos); } \
  109.   NS_IMETHOD GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultScrollbarPreferences(scrollOrientation, _retval); } \
  110.   NS_IMETHOD SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultScrollbarPreferences(scrollOrientation, scrollbarPref); } \
  111.   NS_IMETHOD GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollbarVisibility(verticalVisible, horizontalVisible); } 
  112.  
  113. #if 0
  114. /* Use the code below as a template for the implementation class for this interface. */
  115.  
  116. /* Header file */
  117. class nsScrollable : public nsIScrollable
  118. {
  119. public:
  120.   NS_DECL_ISUPPORTS
  121.   NS_DECL_NSISCROLLABLE
  122.  
  123.   nsScrollable();
  124.  
  125. private:
  126.   ~nsScrollable();
  127.  
  128. protected:
  129.   /* additional members */
  130. };
  131.  
  132. /* Implementation file */
  133. NS_IMPL_ISUPPORTS1(nsScrollable, nsIScrollable)
  134.  
  135. nsScrollable::nsScrollable()
  136. {
  137.   /* member initializers and constructor code */
  138. }
  139.  
  140. nsScrollable::~nsScrollable()
  141. {
  142.   /* destructor code */
  143. }
  144.  
  145. /* long getCurScrollPos (in long scrollOrientation); */
  146. NS_IMETHODIMP nsScrollable::GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *_retval)
  147. {
  148.     return NS_ERROR_NOT_IMPLEMENTED;
  149. }
  150.  
  151. /* void setCurScrollPos (in long scrollOrientation, in long curPos); */
  152. NS_IMETHODIMP nsScrollable::SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos)
  153. {
  154.     return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156.  
  157. /* void setCurScrollPosEx (in long curHorizontalPos, in long curVerticalPos); */
  158. NS_IMETHODIMP nsScrollable::SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos)
  159. {
  160.     return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162.  
  163. /* void getScrollRange (in long scrollOrientation, out long minPos, out long maxPos); */
  164. NS_IMETHODIMP nsScrollable::GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos)
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* void setScrollRange (in long scrollOrientation, in long minPos, in long maxPos); */
  170. NS_IMETHODIMP nsScrollable::SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos)
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* void setScrollRangeEx (in long minHorizontalPos, in long maxHorizontalPos, in long minVerticalPos, in long maxVerticalPos); */
  176. NS_IMETHODIMP nsScrollable::SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos, PRInt32 minVerticalPos, PRInt32 maxVerticalPos)
  177. {
  178.     return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180.  
  181. /* long getDefaultScrollbarPreferences (in long scrollOrientation); */
  182. NS_IMETHODIMP nsScrollable::GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *_retval)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* void setDefaultScrollbarPreferences (in long scrollOrientation, in long scrollbarPref); */
  188. NS_IMETHODIMP nsScrollable::SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* void getScrollbarVisibility (out boolean verticalVisible, out boolean horizontalVisible); */
  194. NS_IMETHODIMP nsScrollable::GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* End of implementation class template. */
  200. #endif
  201.  
  202.  
  203. #endif /* __gen_nsIScrollable_h__ */
  204.